package com.gemserk.infraestructure.lwjglmavenizer;

public class BasicConstants {
	static String WIN = "win";
	static String LINUX = "linux";
	static String MAC = "mac";
	static String SOLARIS = "solaris";

	static X86 = "x86";
	static AMD64 = "amd64";

	static def ARCHS = [X86,AMD64];
	
	static def SOS = [WIN,LINUX,MAC]// no usamos solaris porque no tiene soporte para jinputSOLARIS];
	static def basePath = [(WIN):"windows",(LINUX):"linux",(MAC):"macosx",(SOLARIS):"solaris"]

    static def nativesLWJGL = [(WIN):["lwjgl.dll","lwjgl64.dll"],
                               (LINUX):["liblwjgl.so", "liblwjgl64.so"],
                               (MAC):["liblwjgl.jnilib"],
                               (SOLARIS):["liblwjgl.so", "liblwjgl64.so"]]

    static def nativesJinput = [(WIN):["jinput-dx8.dll","jinput-raw.dll", "jinput-dx8_64.dll","jinput-raw_64.dll"],
                               (LINUX):["libjinput-linux.so", "libjinput-linux64.so"],
                               (MAC):["libjinput-osx.jnilib"]]

    static def nativesOpenal = [(WIN):["OpenAL32.dll", "OpenAL64.dll"],
                               (LINUX):["libopenal.so", "libopenal64.so"],
                               (MAC):["openal.dylib"],
                               (SOLARIS):["libopenal.so", "libopenal64.so"]]

    static def mergeMapsOfList(def map1, map2){
		def result = [:]
		map1.each { key, value ->
			result[(key)] =  value + map2[(key)]
		}
		return result
	}
                               
    static def natives = ["lwjgl":mergeMapsOfList(nativesLWJGL,nativesOpenal),"jinput":nativesJinput,"openal":nativesOpenal];

	static def sources = ["lwjgl":new LWJGLSourcesGenerator()]
	static def javadoc = ["lwjgl":new LWJGLJavadocGenerator()]
	

    static def LIB_LWJGL = "lwjgl";
	static def LIB_LWJGL_UTIL = "lwjgl_util";
	static def LIB_LWJGL_UTIL_APPLET = "lwjgl_util_applet";
	static def LIB_JINPUT = "jinput";
	static def LIB_LZMA = "lzma";
	static def libs = [LIB_LWJGL,LIB_LWJGL_UTIL,LIB_LWJGL_UTIL_APPLET,LIB_JINPUT,LIB_LZMA]


    static def LWJGL_GROUP_ID = "org.lwjgl"
    
    static def mavenId  = [(LIB_LWJGL):[groupId:LWJGL_GROUP_ID,artifactId:"lwjgl"],
                          (LIB_LWJGL_UTIL):[groupId:LWJGL_GROUP_ID,artifactId:"lwjgl-util"],
                          (LIB_LWJGL_UTIL_APPLET):[groupId:LWJGL_GROUP_ID,artifactId:"lwjgl-util-applet"],
                          (LIB_JINPUT):[groupId:LWJGL_GROUP_ID,artifactId:"jinput"],
						  (LIB_LZMA):[groupId:LWJGL_GROUP_ID,artifactId:"lzma"],
                          ];

	
	static def mavenDependencies = [(LIB_LWJGL_UTIL):[mavenId[(LIB_LWJGL)]]]
    
    
	
}